import request from '@/utils/request'

// 查询抢单记录列表
export function listReceive(query) {
  return request({
    url: '/order/receive/list',
    method: 'get',
    params: query
  })
}

// 查询抢单记录详细
export function getReceive(orderId) {
  return request({
    url: '/order/receive/' + orderId,
    method: 'get'
  })
}

// 新增抢单记录
export function addReceive(data) {
  return request({
    url: '/order/receive',
    method: 'post',
    data: data
  })
}
// 新增抢单记录
export function submitReceive(data) {
  return request({
    url: '/order/receive/submitReceive',
    method: 'post',
    data: data
  })
}

// 修改抢单记录
export function updateReceive(data) {
  return request({
    url: '/order/receive',
    method: 'put',
    data: data
  })
}
// 确认-抢单记录
export function selectReceive(data) {
  return request({
    url: '/order/receive/selectReceive',
    method: 'put',
    data: data
  })
}

// 删除抢单记录
export function delReceive(orderId) {
  return request({
    url: '/order/receive/' + orderId,
    method: 'delete'
  })
}

// 导出抢单记录
export function exportReceive(query) {
  return request({
    url: '/order/receive/export',
    method: 'get',
    params: query
  })
}